<?php
	$idNews=$_GET['idNews'];
	$NomListing="Test";

	$req=mysql_query("SELECT * FROM infos_news WHERE idNews='$idNews'") or die (mysql_error());
	$data=mysql_fetch_assoc($req);
	$NomNews=$data['NomNews'];
	$SujetNews=$data['Sujet'];
	$ExpediteurNews=$data['Expediteur'];
	$Code=$data['Code'];
	
	$reqL=mysql_query("SELECT * FROM listing WHERE Listing='$NomListing'") or die (mysql_error());
	$dataL=mysql_fetch_assoc($reqL);
	$idListing=$dataL['idListing'];
	?>
<div id="ContainAdmin">
	<div id="TitreAdmin"></div>
	<div id="LeftAdmin"><font class="TitleCompte">Envoi TEST de la newsletter:</font><br>

	<table width="415" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="TitreEnvoi"><?php echo $NomNews; ?>&nbsp;</td>
	<td class="TitreEnvoi">&nbsp;</td>
	<form action="Newsletter.php" method="get" target="_blank">
	<input name="idNews" type="hidden"  value="<?php echo $idNews ?>">
	<td width="34" align="left" valign="middle" style="padding:5px 0 2px 0; <?php echo $color; ?> "><input name="Envoyer" type="image" img src="./images/Oeil.png" value="Modifier" class="modif"></td>
	</form>
    
  </tr>
  <tr>
    <td colspan="3" class="TitreSujet"><?php echo $SujetNews; ?>&nbsp;</td>
    </tr>
  <tr>
    <td colspan="2" class="TitreExp">Exp&eacute;diteur: <strong><?php echo $ExpediteurNews; ?></strong> </td>
    <td width="34" align="left" valign="middle" style="padding:5px 0 2px 0; <?php echo $color; ?> ">&nbsp;</td>
  </tr>
 </table>
	<br><br>

<table width="415" border="0" cellspacing="0" cellpadding="0">
	 <tr>
	   <td colspan="2" class="TitreListing" style="text-align:center;"><img src="./images/EmailTest.jpg"></td>
      </tr>
</table><div class="LiensEnvois">
<a href="index.php?page=envois"><img src="./images/Retour.jpg"></a>
</div>
		<div class="LiensEnvois">
		<img src="./images/Separator.jpg">
		<br>
		<a href="index.php?page=envoisTest&idNews=<?php echo $idNews; ?>&Envoi=ok"><img src="./images/Envoyer.jpg"></a>	  </div>
	</div>
	<div id="RightAdmin">
	<font class="TitleCompte">Etat de l'envoi:</font><br>
	<img src="./images/Separator.jpg">
		<br>
	<?php
	//include('inc/LaunchEtat.php');
	
	if(isset($_GET['Envoi'])){
	include('inc/LaunchNewsTest.php');
	}

	?>
	
	</div>
	<div class="clr"></div>
</div>